Exercise 1.4.1
Open a terminal and write down which commands you use to:

Display the full path of the current folder: 

PWD

Get a list of all files and folders in the current folder:
LS

Change directory to /home/stud
cd /home/stud

Create a directory /home/stud/test:

mkdir test

Create a file text1 containing hello there using kate:
cd test
cat > text1.txt
Hallo there
crtl d

Create a file text2 containing hello there using echo:
echo Hallo there >> text2.txt

Addend 1234567890 to file text1 using echo:

echo 1234567890 >> text2.txt

Dump the contents of text1 to the terminal window:
cat text2.txt

Copy test1 to the directory test:

cp text1.txt test

Delete text1 and text2 in one go:

rm text1.txt text2.txt

Delete the directory /home/stud/test:
rm -r test


Exercise 1.4.2
Get a list of the currently running processes (programs):
ps aux

Run program xload in the background:
xload&
Om programmet allede køre kan der trykkes ctrl z, programmet vil blive pauset
Hvis man bruger kommando bg vil programmet blive sent til background
Hvis man bruger kommando fg vil programmet blive sent til frontground

Now kill the program xload you just started:
kill 3195
Nummeret skifter fra gang til gang(det er ID nummer der skal benyttes)
For at finde dette nummer benyttes ps aux og programmet findes på listen hvor dets ID vil være.

Write a small shell script that lists the current directory. Remember to make you shell script executable using the program chmod. 

stud@GoldenImage:~$ cat > do.sh
#!/bin/sh
PWD
chmod +x do.sh (giver rettigheder)
./do.sh

Shutdown the system (now):
Sudo shutdown –h now
"+5" i stedet for "now", forsinker 5 min.
Restart
Sudo reboot


Exercise 1.4.3
Display the current date and time in the terminal:
date

Find the IP address of the network adapter eth0:
ifconfig eth0
Hvis man ikke vil have specifik IP men alle skriver man blot ifconfig
IP: 172.16.158.136

Print system information:
uname -(a, s, n, r, v, m, p, i, o)
uname -a giver system information

Print the kernel buffer:
dmesg|less

List all USB devices currently attached to the system:
lsusb

Determine the CPU type by looking the directory /proc:
cd /proc
cat cpuinfo

There is a lot of system information to find in /proc, mention at least 3 different files and what they tell you: 
1. 2. 3. 
Use Google or other resources to find the command(s) necessary to complete the exercise.
1)
cat meminfo
Information om memory og swab usage

2)
cat filesystems
Information om filesystemer der er supported af kernen

3)
cat cmdline
Info om filer, brugt til at starte kernen, kan bruges om problemer med at boote


Hvad har vi fået ud af denne øvelse:
Vi har lært om basic linux comands i terminalen, dette er vigtigt fordi at vi i fremtiden skal skrive til target, hvor der ikke er noget GUI.

Undervejs i øvelsen fik vi ikke nedskrevet hvilke hjemmesider vi benyttede til hjælp men rundt om på nettet findes der meget information ligesom terminalen har en kommande der hedder man hvor alle oplysninger om kommandoen kan findes.
De hjemmesider som hovudsageligt blev benyttet var linux forums.
Én kilde der blev benytte var :
http://maketecheasier.com/proc-filesystem-examine-linux-inner-working/2010/08/19